package net.guerlab.sdk.anubis.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * 蜂鸟开放平台配置
 * 
 * @author guer
 *
 */
@Component
@RefreshScope
@ConfigurationProperties(prefix = AnubisConfig.CONFIG_PREFIX)
public class AnubisConfig {

    public static final String CONFIG_PREFIX = "sdk.anubis";

    /**
     * appId
     */
    private String appId;

    /**
     * secretKey
     */
    private String secretKey;

    /**
     * 测试环境标志
     */
    private boolean dev;

    /**
     * 返回 appId
     *
     * @return appId
     */
    public final String getAppId() {
        return appId;
    }

    /**
     * 设置appId
     *
     * @param appId
     *            appId
     */
    public final void setAppId(
            String appId) {
        this.appId = appId;
    }

    /**
     * 返回 secretKey
     *
     * @return secretKey
     */
    public final String getSecretKey() {
        return secretKey;
    }

    /**
     * 设置secretKey
     *
     * @param secretKey
     *            secretKey
     */
    public final void setSecretKey(
            String secretKey) {
        this.secretKey = secretKey;
    }

    /**
     * 返回 测试环境标志
     *
     * @return 测试环境标志
     */
    public boolean isDev() {
        return dev;
    }

    /**
     * 设置测试环境标志
     *
     * @param dev
     *            测试环境标志
     */
    public void setDev(
            boolean dev) {
        this.dev = dev;
    }
}
